import { ElDatePicker } from 'element-plus';
import '../config/index.scss'

const DatePicker =  (config, params, emit, hasEvent) => {
    if(hasEvent) {
        return (
            <ElDatePicker class="select" {...config.labelProps} v-model={params[config.props.prop]} onChange={() => emit('changeEvent', config)}  />
        )
    }else {
        return (
            <ElDatePicker class="select" {...config.labelProps} v-model={params[config.props.prop]}  />
        )
    }
}

export default DatePicker
